package ${config.packageService};

import ${config.packageEntity}.${tableInfo.javaName}${config.suffixEntity};

import java.util.List;

/**
 * ${tableInfo.dbName}表Service接口<#if tableInfo.comment?? && (tableInfo.comment?length>0)>, ${tableInfo.comment}</#if>
 *
 * @author ${config.author}
 * @date ${.now?string("yyyy-MM-dd HH:mm:ss")}
 */
public interface ${tableInfo.javaName}${config.suffixService} {
    /**
     * 插入<#if tableInfo.comment??>${tableInfo.comment}</#if>
     *
     * @param ${utils.getLowerFirst(tableInfo.javaName)}
     * @return
     */
    void insert(${tableInfo.javaName}${config.suffixEntity} ${utils.getLowerFirst(tableInfo.javaName)});

    /**
     * 更新<#if tableInfo.comment??>${tableInfo.comment}</#if>
     *
     * @param ${utils.getLowerFirst(tableInfo.javaName)}
     * @return
     */
    void update(${tableInfo.javaName}${config.suffixEntity} ${utils.getLowerFirst(tableInfo.javaName)});

    /**
     * 列表查询<#if tableInfo.comment??>${tableInfo.comment}</#if>
     *
     * @param ${utils.getLowerFirst(tableInfo.javaName)}
     * @return
     */
    List<${tableInfo.javaName}${config.suffixEntity}> findList(${tableInfo.javaName}${config.suffixEntity} ${utils.getLowerFirst(tableInfo.javaName)});

    /**
     * 主键查询<#if tableInfo.comment??>${tableInfo.comment}</#if>
     *
    <#list tableInfo.primaryKeyColumns as col>
     * @param ${col.javaName}
    </#list>
     * @return
     */
    ${tableInfo.javaName}${config.suffixEntity} getBy${utils.getUpperCamel(tableInfo.primaryKey)}(<#list tableInfo.primaryKeyColumns as col>${utils.getSimpleTypeName(col.javaType)} ${col.javaName}<#if col?has_next>, </#if></#list>);

}